bitkeeper revision 1.1011.3.1 (40e0586fjTiPMS5QT6pzPb5uZe0MMw)
authormwilli2@equilibrium.research.intel-research.net <mwilli2@equilibrium.research.intel-research.net>
Mon, 28 Jun 2004 17:42:07 +0000 (17:42 +0000)
committermwilli2@equilibrium.research.intel-research.net <mwilli2@equilibrium.research.intel-research.net>
Mon, 28 Jun 2004 17:42:07 +0000 (17:42 +0000)
Various xentrace tweaks.  Should perform better now.  May still need more work.
Let me know if you have problems with it.

tools/xentrace/formats
tools/xentrace/xentrace.c
xen/common/kernel.c
xen/common/schedule.c
xen/include/xen/trace.h

index 9a5b157f47a4102725a1904101d8aec17ccb86f7..0452385484fc500271684f024a167e51ce367c94 100644 (file)
@@ -1,17 +1,17 @@
-#0x00010000    CPU%(cpu)d %(tsc).6f sched_add_domain(0x%(3)08x)            [ dom id = 0x%(1)x%(2)08x   ]
-#0x00010001    CPU%(cpu)d %(tsc).6f sched_rem_domain(0x%08(3)x)            [ dom id = 0x%(1)x%(2)08x   ]
-#0x00010002    CPU%(cpu)d %(tsc).6f __wake_up(0x%(3)08x)                   [ dom id = 0x%(1)x%(2)08x   ]
-#0x00010003    CPU%(cpu)d %(tsc).6f do_block()                             [ current = 0x%(2)08x         ]
-#0x00010004    CPU%(cpu)d %(tsc).6f do_yield()                             [ current = %(2)08x         ]
-#0x00010005    CPU%(cpu)d %(tsc).6f do_set_timer_op(0x%(4)08x, 0x%(5)08x)  [ current = 0x%(3)08x ]
-#0x00010006    CPU%(cpu)d %(tsc).6f sched_ctl(0x%(1)08x)
-#0x00010007    CPU%(cpu)d %(tsc).6f sched_adjdom(params)                   [ dom id = 0x%(1)x%(2)08x   ]
-#0x00010008    CPU%(cpu)d %(tsc).6f __reschedule(0x%(3)08x)                [ dom id = 0x%(1)x%(2)08x   ]
-#0x00010009    CPU%(cpu)d %(tsc).6f switching to task_struct 0x%(1)08x     [ dom id = 0x%(1)x     ]
-#0x0001000A    CPU%(cpu)d %(tsc).6f s_timer_fn(unused)
-#0x0001000B    CPU%(cpu)d %(tsc).6f t_timer_fn(unused)
-#0x0001000C    CPU%(cpu)d %(tsc).6f dom_timer_fn(data)
-#0x0001000D    CPU%(cpu)d %(tsc).6f fallback_timer_fn(unused)
+0x00010000     CPU%(cpu)d %(tsc).6f sched_add_domain(0x%(3)08x)            [ dom id = 0x%(2)08x   ]
+0x00010001     CPU%(cpu)d %(tsc).6f sched_rem_domain(0x%08(3)x)            [ dom id = 0x%(2)08x   ]
+0x00010002     CPU%(cpu)d %(tsc).6f __wake_up(0x%(3)08x)                   [ dom id = 0x%(2)08x   ]
+0x00010003     CPU%(cpu)d %(tsc).6f do_block()                             [ current = 0x%(2)08x  ]
+0x00010004     CPU%(cpu)d %(tsc).6f do_yield()                             [ current = %(2)08x    ]
+0x00010005     CPU%(cpu)d %(tsc).6f do_set_timer_op(0x%(4)08x, 0x%(5)08x)  [ current = 0x%(3)08x  ]
+0x00010006     CPU%(cpu)d %(tsc).6f sched_ctl(0x%(1)08x)
+0x00010007     CPU%(cpu)d %(tsc).6f sched_adjdom(params)                   [ dom id = 0x%(2)08x   ]
+0x00010008     CPU%(cpu)d %(tsc).6f __reschedule(0x%(3)08x)                [ dom id = 0x(2)08x    ]
+0x00010009     CPU%(cpu)d %(tsc).6f switching to task_struct 0x%(1)08x     [ dom id = 0x%(1)x     ]
+0x0001000A     CPU%(cpu)d %(tsc).6f s_timer_fn(unused)
+0x0001000B     CPU%(cpu)d %(tsc).6f t_timer_fn(unused)
+0x0001000C     CPU%(cpu)d %(tsc).6f dom_timer_fn(data)
+0x0001000D     CPU%(cpu)d %(tsc).6f fallback_timer_fn(unused)
 
 
 0x00020008     CPU%(cpu)d %(tsc).6f enter: dom0_create_dom ( )
index dae9b67d801b85af9395fdd4453672f1c66483cf..3560745a4272af9a1b8aa981c8bf2d0ed2122774 100644 (file)
@@ -311,7 +311,7 @@ int monitor_tbufs(FILE *logfile)
 /*         printf("XX%d: cons=%ld head=%ld  %p\n", i,
                   cons[i], meta[i]->head, data[i] + (cons[i] % size_in_recs) );
                   */
-           while( cons[i] < meta[i]->head )
+           while( cons[i] != meta[i]->head )
            {
 /*
                if( (cons[i] % 6  ) == 0 )
index a4d3fa75dfdd1923e505fa4e5ffa7276a4f161a9..74cc115d310ea5d7c506931f1009ed6cf24ca0a9 100644 (file)
@@ -59,7 +59,7 @@ int opt_watchdog=0;
 /* opt_pdb: Name of serial port for Xen pervasive debugger (and enable pdb) */
 unsigned char opt_pdb[10] = "none";
 /* opt_tbuf_size: trace buffer size (in pages) */
-unsigned int opt_tbuf_size = 1;
+unsigned int opt_tbuf_size = 10;
 /* opt_sched: scheduler - default to Borrowed Virtual Time */
 char opt_sched[10] = "bvt";
 /* opt_physdev_dom0_hide: list of PCI slots to hide from domain 0. */
index b54c0efc458fcd930a3e637cbb3b8da73bef2141..5c2ca1579aeb9afe86cd7b061945cf45d3e2959e 100644 (file)
@@ -58,9 +58,6 @@
 #define TRC_SCHED_DOM_TIMER_FN        0x0001000C
 #define TRC_SCHED_FALLBACK_TIMER_FN   0x0001000D
 
-#define _HIGH32(_x) (_x >> 32)
-#define _LOW32(_x)  ((u32)_x )
-
 /* Various timer handlers. */
 static void s_timer_fn(unsigned long unused);
 static void t_timer_fn(unsigned long unused);
@@ -147,14 +144,14 @@ void sched_add_domain(struct domain *d)
 
     SCHED_OP(add_task, d);
 
-    TRACE_3D(TRC_SCHED_DOM_ADD, _HIGH32(d->domain), _LOW32(d->domain), d);
+    TRACE_2D(TRC_SCHED_DOM_ADD, d->domain, d);
 }
 
 void sched_rem_domain(struct domain *d) 
 {
     rem_ac_timer(&d->timer);
     SCHED_OP(rem_task, d);
-    TRACE_3D(TRC_SCHED_DOM_REM, _HIGH32(d->domain), _LOW32(d->domain), d);
+    TRACE_2D(TRC_SCHED_DOM_REM, d->domain, d);
 }
 
 void init_idle_task(void)
@@ -207,7 +204,7 @@ void domain_wake(struct domain *d)
 
     if ( likely(domain_runnable(d)) && likely(!__task_on_runqueue(d)) )
     {
-        TRACE_3D(TRC_SCHED_WAKE, _HIGH32(d->domain), _LOW32(d->domain), d);
+        TRACE_2D(TRC_SCHED_WAKE,d->domain, d);
         SCHED_OP(wake_up, d);
 #ifdef WAKE_HISTO
         p->wokenup = NOW();
@@ -296,8 +293,7 @@ long do_set_timer_op(unsigned long timeout_hi, unsigned long timeout_lo)
         add_ac_timer(&p->timer);
     }
 
-    TRACE_5D(TRC_SCHED_SET_TIMER, _HIGH32(p->domain), _LOW32(p->domain),
-             p, timeout_hi, timeout_lo);
+    TRACE_4D(TRC_SCHED_SET_TIMER, p->domain, p, timeout_hi, timeout_lo);
 
     return 0;
 }
@@ -335,7 +331,7 @@ long sched_adjdom(struct sched_adjdom_cmd *cmd)
     if( p == NULL )
         return -ESRCH;
 
-    TRACE_2D(TRC_SCHED_ADJDOM, _HIGH32(p->domain), _LOW32(p->domain));
+    TRACE_1D(TRC_SCHED_ADJDOM, p->domain);
 
     SCHED_OP(adjdom, p, cmd);
 
index 782023f76ee8f0e453240576736b48333d9f7fb9..3064c47a0bbb35a12f78b003db10efdf43b89f5f 100644 (file)
@@ -80,7 +80,7 @@ static inline int trace(u32 event, u32 d1, u32 d2, u32 d3, u32 d4, u32 d5)
 
     buf->head_ptr++;
     buf->head++;
-    if ( buf->head_ptr == (buf->vdata + (buf->size-1)) )
+    if ( buf->head_ptr == (buf->vdata + buf->size) )
         buf->head_ptr = buf->vdata;
 
     local_irq_restore(flags);